﻿using System.ComponentModel.DataAnnotations;

namespace PLC.Domain.Models;

/// <summary>
/// 接收的plc操作model
/// </summary>
public class PLCOperationModel
{
    /// <summary>
    /// 寄存器
    /// </summary>
    [Required]
    public string Register { get; set; }
    /// <summary>
    /// 值
    /// </summary>
    public string? Value { get; set; }
    /// <summary>
    /// ip
    /// </summary>
    [Required]
    public string Ip { get; set; }
    /// <summary>
    /// 设备id
    /// </summary>
    public long DeviceId { get; set; }
    /// <summary>
    /// 数据类型
    /// </summary>
    public int DataType { get; set; }
    /// <summary>
    /// 编码
    /// </summary>
    public int Encoding { get; set; }
    /// <summary>
    /// 长度
    /// </summary>
    public int Length { get; set; }
    /// <summary>
    /// plc类型
    /// </summary>
    public int Protocol { get; set; }
}